$.ajax({
    url:"../json/classification.json",
    type:"get",
    success:function(date){
        //console.log(res);
        var str = template('temp',{att:date});
        $('.right').html(str);
    }
})
$('.ren').click(function(){
    $('.right').css({color:'#000',lineHeight:'',fontSize:"30px"});
    $(this).next().next().toggle(1000).parent().siblings().children('ol').hide(1000);
        if($(this).next().text() == '^'){
            $(this).next().text('v')
        }else{
            $(this).next().text('^')  
        }
        
        $.ajax({
            url:"../json/classification2.json",
            type:"get",
            success:function(date){
                //console.log(res);
                var str = template('temp1',{att:date});
                $('.right').html(str);
            }
        })
       
})
$('ol>li').click(function(){
    $('ol>li').siblings().removeClass('active');
    $(this).addClass('active');
})
$('.ul>.li').click(function(){
    $('.right').css({color:'#000',lineHeight:'',fontSize:"30px"});
    $('.ul>.li').removeClass('active');
    $(this).addClass('active');
    $.ajax({
        url:"../json/classification.json",
        type:"get",
        success:function(date){
            //console.log(res);
            var str = template('temp',{att:date});
            $('.right').html(str);
        }
    })
   
})
$('ol>li').click(function(){
    $('.right').css({width:"100wh",height:"100vh",background:"white",textAlign:'center',lineHeight:"100vh",fontSize:"30px",color:"red"}).html('没有存货了，求求你买点别的吧！');
})

